package com.example.dao.impl;

import com.example.dao.studentdao;
import com.example.entity.Product;
import com.example.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
/**
 * 使用JdbcTemplate实现对持久层的操作
 */
@Repository
public class studentdaoimpl implements studentdao {

    @Autowired
    private JdbcTemplate template;

    @Override
    public int insert(Student student) {
        return template.update("insert into student values (?,?,?,?,?,?)"
                , student.getSid(), student.getName(), student.getEnglishName(), student.getAddress(), student.getPhoneNumber(), student.getBirthday());
    }
}
